package com.lukebang.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.lukebang.service.IExportService;

/**
 * 
 * ExportForController 上午10:48:28
 * 
 * Copyright zhaocj Inc. All rights reserved.
 * Love ME Like Justin Bieber.
 */

@Controller
public class ExportForController {
	private static Logger logger = LogManager.getLogger(ExportForController.class.getName());
	@Resource
	IExportService exportService;

	/**
	 * 
	 * @param type
	 *            订单的类型
	 * @param status
	 *            订单的状态
	 * @param beginTime
	 *            订单的开始时间
	 * @param endTime
	 *            订单的结束时间
	 */
	@RequestMapping("/exportExcel")
	public void exportExcel(HttpServletRequest request, HttpSession session, HttpServletResponse response, Integer type,
			Integer status, String beginTime, String endTime) {
		try {
			exportService.selectIndentForExportExcel(request, session, response, type, status, beginTime, endTime);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
